Skip to content

feat(all): add clipboard controls and improve sync reliability, downloads, and client interfaces - #188

Merged
Sathvik-Rao merged 48 commits into
mainfrom
feat/clipcascade-improvements
Nov 1, 2026
Merged

Sathvik-Rao merged 48 commits into
mainfrom
feat/clipcascade-improvements

Conversation

@Sathvik-Rao

@Sathvik-Rao Sathvik-Rao commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Description

Clipboard sync and connections

  • Add per-device send and receive controls for two-way, send-only, receive-only, or paused clipboard sync.
  • Add selectable clipboard size units: Bytes, KiB, MiB, and GiB.
  • Add optional desktop notifications for received clipboard content.
  • Improve clipboard compatibility across platforms, including Unicode text, file attachments, and macOS file copying.
  • Refresh server connection settings on startup and reconnect, including switching between P2P and server modes without logging in again.
  • Improve P2P connection recovery with timeouts, retry backoff, and more reliable connection negotiation.
  • Fix desktop encrypted-sync startup by preparing the encryption key before clipboard monitoring begins and requiring login when a saved encrypted session lacks a key.

Downloads and sharing

  • Add clearer download progress and completion/failure feedback across desktop, Android, and browser clients.
  • Add a persistent default download folder on Android and notifications that open the destination folder.
  • Preserve existing desktop downloads by automatically choosing numbered filenames.
  • Improve Android sharing support for text, images, multiple attachments, and files with missing metadata.
  • Improve handling of interrupted or disconnected shares and prevent previously consumed shares from replaying when reopening Android.

Android

  • Add optional Shizuku-assisted permission setup alongside manual ADB instructions.
  • Refresh the sync screen, connection indicators, update notices, and setup guide.
  • Improve password entry and visibility controls.
  • Improve login/session handling and provide clearer errors when Android clipboard limits prevent copying content.
  • Improve background service startup, shutdown, and recovery to prevent overlapping sync sessions and keep displayed status accurate.

Desktop and Linux CLI

  • Keep open tray menus updated with current connection status, peer counts, and download actions.
  • Improve tray status indicators and organize sync controls and help links.
  • Add an option to hide the successful-login dialog.
  • Improve login settings layout, cancellation, and application shutdown.
  • Use native download folder pickers on Windows and macOS.
  • Automatically refresh the Linux CLI menu while preserving typed input.

Web interface and self-hosting

  • Improve mobile layouts, navigation, login autofill, and browser-menu web app installation.
  • Remember manually selected light and dark themes.
  • Improve CAPTCHA readability, consistency, and difficulty scaling.
  • Add reverse-proxy deployment examples for Nginx, Traefik, Caddy, and Nginx Proxy Manager, plus connection diagnostics and setup guidance.

PR title format (required — enforced by CI)

<group>[+<group>...]: <description>

where each <group> is <type>[!](<scope>[,<scope>...]).

Type → bump

Type Bump Release?
feat! / fix! / <type>! major yes
feat minor yes
fix, perf patch yes
docs, chore, refactor, test, ci, build, style none no

Scope → platform (required for feat/fix/perf)

windows · macos · linux-gui · linux-cli · linux* · android · server · desktop* · all

* linux = both Linux variants. desktop = windows + macos + both linux.
Linux GUI and CLI are tracked separately for versioning but share one package artifact.

Mixed bumps

Join groups with + to describe different types of changes:

  • feat(server)+fix(windows): backend rewrite + tray crash
  • feat!(android)+feat(server)+fix(desktop): rework crypto

The highest bump across all groups advances the global release version
(major > minor > patch). Every selected platform adopts that version;
unselected platforms keep their existing versions and packages.

Rules

  • A scope may appear in only one group across the title.
  • Releasing and non-releasing types cannot be mixed.
  • Non-releasing types take no scope.

Examples

  • feat(server): add OIDC login
  • fix(windows,macos): clipboard race on paste
  • feat!(android): rework key derivation
  • feat(server)+fix(windows): ...
  • docs: update README ← no release

Checklist

  • PR title matches the format above
  • Description filled in (becomes the release "What's New")
  • Each scope lists every platform actually changed — no more, no less
  • Tested locally on the platforms in scope
  • Breaking change? ! is in the title AND impact is described below
  • No secrets, keystores, or .env files added to the diff

Breaking changes (if any)

- Bundle Roboto Mono to avoid system-dependent fonts and symbol glyphs
- Keep all characters visible with clear contrast and spacing
- Use secure random answers and exclude ambiguous characters
- Scale distortion and interference from plain at 0% to strongest at 100%
- Handle case-insensitive validation consistently across locales
- Save manually selected light or dark mode for this site.
- Restore the saved preference across pages and browser restarts.
- Follow system theme changes until a manual preference is selected.
- Keep theme switching functional when browser storage is unavailable.
…upport

- Add collapsible mobile navigation and responsive layouts across all five pages.
- Improve touch targets, form spacing, table scrolling, and modal sizing.
- Position the login footer at the bottom of short screens.
- Disable username auto-capitalization and autocorrect while preserving entered case.
- Add password-manager hints and hash login submissions without modifying the visible password.
- Add a web app manifest and icons for browser-menu installation.
…xamples

- Use Android's cookie jar and verify authentication after login.
- Report incorrect credentials separately from session failures.
- Wait for cookie clearing to finish before continuing login.
- Clear stale connection and peer messages when the service is no longer running.
- Improve WebSocket errors and display connection-close codes.
- Add Nginx, Traefik, and Caddy deployment examples.
- Add options for existing containerized proxies and host-based proxies.
- Document Nginx Proxy Manager setup and common connection problems.
- Add an optional login and WebSocket connection checker.
- Update README and API guidance for cookies, HTTPS forwarding, custom ports,
  WebSocket origins, and external SSO.
- Cancel pending P2P reconnect timers when stopping the foreground service.
- Prevent stopped service instances from reconnecting when a new instance
  sets the shared running flag back to true.
- Ignore callbacks from stopped or replaced signaling sockets.
- Guard against overlapping Start/Stop actions.
- Keep the service toggle variable local to each operation.
- Add an advanced setting for clipboard receive notifications, disabled by default.
- Save the preference immediately in both GUI and CLI modes.
- Show text previews, image dimensions, and filenames with content-type icons.
- Display native notifications in GUI mode and terminal messages in Linux CLI mode.
- Notify only after incoming content is accepted locally.
- Dispatch notifications asynchronously to avoid blocking clipboard sync.
- Keep this setting independent of connection and update notifications.
- Document the desktop setting; leave Android unchanged.
- Add independent Send Clipboard and Receive Clipboard settings before login on desktop and Android.
- Enable both by default and save preferences per device.
- Support two-way, send-only, receive-only, and paused sync in server and P2P modes.
- Keep connections active when both options are disabled.
- Group GUI settings with labeled borders on desktop and shaded cards on mobile.
- Add CLI login prompts without changing its visual layout.
- Update the README feature list.
- Add Bytes, KiB, MiB, and GiB selection on desktop GUI and Android.
- Default to Bytes and display existing values unchanged.
- Keep blank input as no local limit.
- Support decimals while storing limits in bytes.
- Prevent invalid edits from overwriting saved limits.
- Fix mobile unit-menu clipping with scrolling and keyboard dismissal.
…messages

- Report text clipboard write failures in server and P2P modes.
- Explain Android’s clipboard transaction limit and suggest smaller text or file transfer.
- Distinguish image preparation errors from Android clipboard write failures.
- Keep shared-text transfers working when the local clipboard copy fails.
- Add Choose, Change, and Clear controls in login advanced settings.
- Persist folder access across app and device restarts.
- Reuse the default folder and prompt again if access is lost.
- Ask for a destination on each download when no default is set.
- Document download folders and send/receive clipboard settings.
- Group shared and platform-specific README settings consistently.
- Add desktop tray progress and completion/failure notifications.
- Add Android file-count progress, destination paths, and tap-to-open-folder notifications.
- Add a default-enabled “Notify when downloads finish” preference on desktop and Android.
- Remove desktop download-start notifications.
- Clear completed download status when clipboard content changes.
- Prevent duplicate downloads while saving.
- Use singular/plural file labels.
- Add browser download preparation, start, and failure feedback; preserve Unicode content.
- Fix Android text/plain attachments being ignored instead of transferred as files.
- Document the notification preference in README and update App.js’s file list.
…d Linux

- Prioritize Android file attachments over accompanying text.
- Read shared attachments from ClipData when EXTRA_STREAM is absent.
- Support styled shared text as plain text and read multiple clipboard items.
- Preserve comma-containing URIs using structured arrays.
- Preserve duplicate filenames with unique names and support __proto__ filenames.
- Handle missing attachment metadata, unknown sizes, and local file URIs.
- Add a latest-only startup buffer with a 10-second expiry.
- Discard buffered shares when newer clipboard content arrives.
- Fail disconnected/interrupted sends without automatic replay.
- Update sent-content hashes after sending.
- Await P2P sends, keep batch recipients consistent, and surface errors.
- Fix the undeclared variable in P2P receiving.
- Prevent image-echo suppression from dropping subsequent text/files.
- Prioritize Windows file entries and correct legacy text decoding.
- Decode Linux file URLs and request available clipboard formats.
- Preserve single-image sync, multiple-image file transfers, and download notifications.
- Discover server mode when reusing saved sessions on desktop and Android.
- Refresh WebSocket URLs, STUN settings, and server size limits without
  requiring login again.
- Switch between P2P and P2S during reconnect, including in open browser tabs.
- Preserve local clipboard limits and cached settings for older servers
  without the mode endpoint.
- Keep Android clipboard and logcat monitoring active across mode changes.
- Start Android log access before network discovery and prevent old logcat
  threads from terminating replacement readers.
Android:
- Redesign the sync screen with cards and light/dark colors
- Add connection status dots and Start/Stop busy states
- Move Log out to the header
- Order content as sync, update notice, file transfers, and setup guide
- Hide file transfers when no files or transfers are active
- Add an update card with version details and an Update button
- Organize sharing instructions, ADB setup, and battery settings
- Add Copy buttons and explanations for ADB commands
- Remember setup guide visibility locally
- Adjust text spacing to reduce clipping
- Add an inline monkey toggle for password visibility
- Mask typed password characters immediately
- Disable password autofill, autocorrect, and spellcheck
- Request no keyboard learning on Android 8+
- Retain password keyboard mode while revealing text

Desktop:
- Use actual transport state for tray connection status
- Show green when connected, red when reconnecting/disconnected,
  and orange while stopping
- Rename Connect/Disconnect to Start sync/Stop sync
- Group secondary links under Help/About
- Preserve the original password monkey control

CLI unchanged.
- Add optional Shizuku setup behind an expandable link in the Android setup guide.
- Request authorization and grant overlay access before READ_LOGS.
- Warn users before granting permissions because Android may close the app.
- Add a confirmed force-stop action when the app stays open.
- Handle denied access, unavailable Shizuku, timeouts, and partial grants.
- Register the native module, privileged service, and AIDL interface.
- Preserve existing clipboard monitoring and manual ADB instructions.
- Add a Shizuku note to the README.
- Use prompt_toolkit to refresh status, peers, downloads, and update options.
- Display clipboard notifications above the menu without disrupting typed input.
- Keep option numbers stable while a selection is being entered.
- Remove manual refresh messages and skip redundant download-option resets.
- Preserve redirected input and handle EOF and Ctrl+C.
- Add the dependency to Linux requirements and installation instructions.
- Show connection status, version, and disconnect countdown without option numbers.
- Number only actionable menu entries.
- Measure terminal display widths to align borders around emoji labels.
- Remove label-specific padding adjustments.
- Clear the completed prompt to prevent duplicate menus in scrollback.
- Remove routine "Please wait..." output.
- Prefer UTF-8 clipboard targets regardless of advertised format order.
- Decode legacy X11 STRING content as Latin-1.
- Skip malformed text without stopping clipboard monitoring.
- Allow outbound server update checks in reverse-proxy deployments.
- Keep backend ports unpublished in bundled proxy setups.
- Document backend network behavior.
Move the WSInterface tray import behind TYPE_CHECKING to avoid
loading prompt_toolkit for a type annotation at runtime.
@Sathvik-Rao Sathvik-Rao changed the title clipcascade-improvements feat(all): add clipboard controls, improve transfers, and refresh client interfaces Oct 30, 2026
@Sathvik-Rao
Sathvik-Rao marked this pull request as ready for review October 30, 2026 04:25
Update existing native tray menus in place so peer counts, connection
status, and actions refresh without closing and reopening the menu.

- Update Windows menus through the tray message loop.
- Preserve and update macOS and GTK/AppIndicator menu objects.
- Allow macOS main-thread updates during menu tracking.
Clear consumed share intent payloads after buffering content.
Ignore retained share intents during activity restoration and
share intents launched from Recents history.
- Run download handling on a dedicated Windows thread.
- Create and destroy the picker’s Tk owner on that thread.
- Balance COM initialization around the folder picker.
- Replace blocking download fallback and error dialogs with notifications.
- Preserve existing submenu attachments and separators during tray refreshes.
- Preserve menu layout and action identities while the popup is open.
- Defer structural menu changes until the popup closes.
- Fix WinError 87 when refreshing default actions such as Download.
- Refresh the menu after cancelling the download folder picker.
- Replace blocking Windows tray error dialogs with notifications.
- Wait for active file saves before Quit or Log out.
- Prevent new downloads and saves after shutdown begins.
- Handle Ctrl+C and Ctrl+Break through graceful tray shutdown.
- Restore previous signal handlers and destroy the Tk owner on exit.
Share one long-lived, main-thread Tk interpreter across login windows,
dialogs, and the tray to address Tcl_AsyncDelete crashes caused by
worker-thread garbage collection of destroyed windows.

- Use Toplevel windows for Linux and macOS login forms and dialogs.
- Wait for individual windows without closing the shared Tk owner.
- Use desktop notifications for tray messages on both platforms.
- Replace the macOS Tk folder picker with native NSOpenPanel.
- Guard download pickers against worker-thread Tk access.
- Stop stats updates when the Linux tray loop exits.
- Add exponential retry backoff capped at 30 seconds, resetting
  after a data channel opens.
- Ignore stale connection and channel callbacks during recovery.
- Serialize peer setup, offers, answers, and ICE candidate handling.
- Queue early ICE candidates until the remote description is ready.
- Preserve untouched peer placeholders and their queued candidates.
- Drain pending desktop ICE checks before closing peer connections.
- Improve desktop and Android signaling error logging.
- Share one main-thread Tkinter interpreter across Windows dialogs.
- Replace the Windows worker-thread Tkinter folder picker with
  a native shell dialog.
Add a 90-second data-channel connection deadline to desktop, Android,
and browser clients. Recover stalled connections with exponential
retry delays capped at 30 seconds while preserving healthy peers.

Cancel recovery timers on success, peer removal, replacement, and
shutdown. Add browser handling for fresh recovery offers and early
ICE candidates, plus timeout diagnostics.
…colors

- Save desktop downloads with numbered filenames when the destination name
  already exists, preserving files across sessions.
- Use exclusive file creation to prevent concurrent downloads from overwriting
  each other.
- Avoid reserving a numbered name needed by another file in the same batch.
- Reject invalid download filenames and show the saved filename in CLI messages.
- Use green for Start Sync and red for Stop Sync on Android.
- Use theme-aware red text for Log out on Android.
Run heartbeat checks independently of discovery and transfers so
reopening the app does not mistake a connecting service for a dead one.

Cancel discovery requests and retry delays when sync stops, and clean
up the heartbeat timer on exit.

Clarify that unavailable connections reject shares and require
sharing again.
Assign each sync run a unique native ID and guard callbacks, sends,
and shared-state writes against stale ownership.

Wait for transport and clipboard shutdown before allowing a
replacement run. Report a 15-second shutdown timeout without
permitting overlapping runs.

Use coordinated shutdown for stop, logout, and failed-heartbeat
recovery. Preserve JSON escaping in native storage reads and writes.
Capture connection readiness before reading a pending share so a
connection opening during the native read cannot cause it to send.

Track sync_requested separately from wsIsRunning. Preserve sync
intent after unexpected service failures so periodic checks can
report an inactive service. Clear intent on explicit Stop or Logout.

Use the same intent for boot recovery, with a fallback for existing
installations, and recheck intent before showing an inactivity alert.
- Add a “Don't show this again” checkbox to the login success dialog.
- Persist the choice in DATA as hide_login_success_dialog.
- Pause auto-close when the checkbox is toggled.
- Keep error dialogs visible regardless of this preference.
- Isolate dialog styles so login labels remain readable after errors.
- Fix closing the login form after a failed attempt.
- Support Escape to quit without another login attempt.
Use native theme colors for dialog labels and checkboxes while
keeping dialog styles isolated from the login form.
- Scope mouse-wheel bindings to the login window instead of the whole app.
- Track and cancel pending window timers during destruction.
- Remove completed and cancelled timers from tracking.
- Stop update polling from rescheduling after the login form closes.
- Add Cancel to the update prompt and make it the default response.
- Open the download page only when Yes is selected.
- Forward KeyboardInterrupt from Tk callbacks to application cleanup.
- Close GUI windows before re-raising the interrupt outside Tcl.
- Force STOMP deactivation after a five-second graceful shutdown timeout.
- Retain service ownership until STOMP cleanup completes.
- Update the dashboard when the background service stops.
- Clear stale connection, peer, and download controls.
- Preserve the original service error after cleanup.
- Replace null STOMP teardown callbacks with no-op handlers.
@Sathvik-Rao Sathvik-Rao changed the title feat(all): add clipboard controls, improve transfers, and refresh client interfaces feat(all): add clipboard controls and improve sync reliability, downloads, and client interfaces Nov 1, 2026
- Derive encryption key before connecting either transport
- Require login for saved encrypted sessions missing a key
- Identify discovery endpoints returning invalid JSON
- Reject discovery responses that are not JSON objects
- Use fallback screen dimensions when xrandr is unavailable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant